package routers

import (
	"inventory-system/controllers"

	"github.com/beego/beego/v2/server/web"
)

func init() {
	web.Router("/", &controllers.ProductController{}, "get:List")
	web.Router("/login", &controllers.AuthController{}, "get,post:Login")
	web.Router("/logout", &controllers.AuthController{}, "get:Logout")
	web.Router("/products", &controllers.ProductController{}, "get:List")
	web.Router("/products/add", &controllers.ProductController{}, "post:Add")
	web.Router("/products/update", &controllers.ProductController{}, "post:Update")
	web.Router("/products/delete", &controllers.ProductController{}, "post:Delete")
	web.Router("/products/sell", &controllers.ProductController{}, "post:Sell")
	web.Router("/products/export", &controllers.ProductController{}, "get:Export")
	web.Router("/products/check-code", &controllers.ProductController{}, "get:CheckUniqueCode")
	web.Router("/products/detail", &controllers.ProductController{}, "get:GetProductDetail")
}
